package com.beidu.lottery.call.entity.form;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 活动基础信息表单Form
 * </p>
 *
 * @author 北渡
 * @since 2023-08-09
 */
@Data
@Builder
@ApiModel(value = "InfoSaveStep1Form", description = "活动基础信息表单Form")
@Accessors(chain = true)
@Validated
@AllArgsConstructor
@NoArgsConstructor
public class InfoSaveStep1Form implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键ID")
    private Integer id;

    @ApiModelProperty(value = "活动名称")
    @Length(max = 50)
    @NotNull
    private String activityName;

    @ApiModelProperty(value = "活动类型(0-报名活动、1-投票活动)")
    @NotNull
    private Integer activityType;

    @ApiModelProperty(value = "活动开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime activityBeginTime;

    @ApiModelProperty(value = "活动结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull
    private LocalDateTime activityEndTime;

    @ApiModelProperty(value = "活动规则说明")
    @NotNull
    private String activityRuleDescribe;

    @ApiModelProperty(value = "活动封面图Url")
    @NotNull
    private String coverImgUrl;

    @ApiModelProperty(value = "分享标题")
    private String shareTitle;

    @ApiModelProperty(value = "分享副标题")
    private String shareSubtitle;

    @ApiModelProperty(value = "分享图标地址")
    private String shareIconUrl;

    @ApiModelProperty(value = "创建人id")
    private Integer createdBy;

    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdDate;

    @ApiModelProperty(value = "更新人id")
    private Integer updatedBy;

    @ApiModelProperty(value = "更新时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedDate;


}
